ISBN=input()
number=ISBN.replace('-','')
summary=0
for i in range(12):
    if i%2 == 0:
        summary+=int(number[i])
    else:
        summary+=int(number[i])*3
rest=summary%10
label=10-rest
if label == 10:
    label=0
if ISBN[-1] == str(label):
    print('Right')
else:
    ISBN=ISBN[:-1]+str(label)
    print(ISBN)
